\(\int \frac {a+b \sin (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx\) [543]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 61 \[ \int \frac {a+b \sin (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=-\frac {2 b \sqrt {e \cos (c+d x)}}{d e}+\frac {2 a \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d \sqrt {e \cos (c+d x)}} \]

[Out]

2*a*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))*cos(d*x+c)^(1/2)/d/(
e*cos(d*x+c))^(1/2)-2*b*(e*cos(d*x+c))^(1/2)/d/e

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2748, 2721, 2720} \[ \int \frac {a+b \sin (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\frac {2 a \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d \sqrt {e \cos (c+d x)}}-\frac {2 b \sqrt {e \cos (c+d x)}}{d e} \]

[In]

Int[(a + b*Sin[c + d*x])/Sqrt[e*Cos[c + d*x]],x]

[Out]

(-2*b*Sqrt[e*Cos[c + d*x]])/(d*e) + (2*a*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2])/(d*Sqrt[e*Cos[c + d*x]]
)

Rule 2720

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ
[{c, d}, x]

Rule 2721

Int[((b_)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[(b*Sin[c + d*x])^n/Sin[c + d*x]^n, Int[Sin[c + d*x]
^n, x], x] /; FreeQ[{b, c, d}, x] && LtQ[-1, n, 1] && IntegerQ[2*n]

Rule 2748

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-b)*((g*Co
s[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Dist[a, Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x
] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])

Rubi steps \begin{align*} \text {integral}& = -\frac {2 b \sqrt {e \cos (c+d x)}}{d e}+a \int \frac {1}{\sqrt {e \cos (c+d x)}} \, dx \\ & = -\frac {2 b \sqrt {e \cos (c+d x)}}{d e}+\frac {\left (a \sqrt {\cos (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{\sqrt {e \cos (c+d x)}} \\ & = -\frac {2 b \sqrt {e \cos (c+d x)}}{d e}+\frac {2 a \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d \sqrt {e \cos (c+d x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.28 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.82 \[ \int \frac {a+b \sin (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\frac {-2 b \cos (c+d x)+2 a \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{d \sqrt {e \cos (c+d x)}} \]

[In]

Integrate[(a + b*Sin[c + d*x])/Sqrt[e*Cos[c + d*x]],x]

[Out]

(-2*b*Cos[c + d*x] + 2*a*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2])/(d*Sqrt[e*Cos[c + d*x]])

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.23 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.23

method result size
parts \(\frac {2 a \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \operatorname {am}^{-1}\left (\frac {d x}{2}+\frac {c}{2}| \sqrt {2}\right )}{d \sqrt {e \left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right )}}-\frac {2 b \sqrt {e \cos \left (d x +c \right )}}{d e}\) \(75\)
default \(-\frac {2 \left (\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a -2 b \left (\sin ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) e +e}\, d}\) \(106\)
risch \(-\frac {b \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right ) \sqrt {2}\, {\mathrm e}^{-i \left (d x +c \right )}}{d \sqrt {e \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right ) {\mathrm e}^{-i \left (d x +c \right )}}}+\frac {2 a \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {i \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, F\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right ) \sqrt {e \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right ) {\mathrm e}^{i \left (d x +c \right )}}\, {\mathrm e}^{-i \left (d x +c \right )}}{d \sqrt {{\mathrm e}^{3 i \left (d x +c \right )} e +{\mathrm e}^{i \left (d x +c \right )} e}\, \sqrt {e \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right ) {\mathrm e}^{-i \left (d x +c \right )}}}\) \(232\)

[In]

int((a+b*sin(d*x+c))/(e*cos(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*a/d/(e*(2*cos(1/2*d*x+1/2*c)^2-1))^(1/2)*(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)*InverseJacobiAM(1/2*d*x+1/2*c,2^(1
/2))-2*b*(e*cos(d*x+c))^(1/2)/d/e

Fricas [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.09 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.23 \[ \int \frac {a+b \sin (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\frac {-i \, \sqrt {2} a \sqrt {e} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} a \sqrt {e} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 2 \, \sqrt {e \cos \left (d x + c\right )} b}{d e} \]

[In]

integrate((a+b*sin(d*x+c))/(e*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

(-I*sqrt(2)*a*sqrt(e)*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) + I*sqrt(2)*a*sqrt(e)*weierstr
assPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) - 2*sqrt(e*cos(d*x + c))*b)/(d*e)

Sympy [F]

\[ \int \frac {a+b \sin (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\int \frac {a + b \sin {\left (c + d x \right )}}{\sqrt {e \cos {\left (c + d x \right )}}}\, dx \]

[In]

integrate((a+b*sin(d*x+c))/(e*cos(d*x+c))**(1/2),x)

[Out]

Integral((a + b*sin(c + d*x))/sqrt(e*cos(c + d*x)), x)

Maxima [F]

\[ \int \frac {a+b \sin (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\int { \frac {b \sin \left (d x + c\right ) + a}{\sqrt {e \cos \left (d x + c\right )}} \,d x } \]

[In]

integrate((a+b*sin(d*x+c))/(e*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate((b*sin(d*x + c) + a)/sqrt(e*cos(d*x + c)), x)

Giac [F]

\[ \int \frac {a+b \sin (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=\int { \frac {b \sin \left (d x + c\right ) + a}{\sqrt {e \cos \left (d x + c\right )}} \,d x } \]

[In]

integrate((a+b*sin(d*x+c))/(e*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((b*sin(d*x + c) + a)/sqrt(e*cos(d*x + c)), x)

Mupad [B] (verification not implemented)

Time = 6.07 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.77 \[ \int \frac {a+b \sin (c+d x)}{\sqrt {e \cos (c+d x)}} \, dx=-\frac {2\,\sqrt {\cos \left (c+d\,x\right )}\,\left (b\,\sqrt {\cos \left (c+d\,x\right )}-a\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )\right )}{d\,\sqrt {e\,\cos \left (c+d\,x\right )}} \]

[In]

int((a + b*sin(c + d*x))/(e*cos(c + d*x))^(1/2),x)

[Out]

-(2*cos(c + d*x)^(1/2)*(b*cos(c + d*x)^(1/2) - a*ellipticF(c/2 + (d*x)/2, 2)))/(d*(e*cos(c + d*x))^(1/2))